home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple Reference & Present…nuary (Partner) - Disc 2
/
The Apple Reference and Presentations Library (Disc 2)(January 1994).iso
/
Synergy Software
/
US English
/
KaleidaGraph™-PPC
/
Examples folder
/
Macro Source
/
Integrate
< prev
next >
Wrap
Text File
|
1993-04-14
|
3KB
|
427 lines
alpha "Integrate:"
ibase
STOa 9
;
FIX 0
;
alpha "X Column"
STOa 0
0e+00
STO 00
;
alpha "Y Column"
STOa 1
1
STO 01
;
RCLa 9
inpt 2
;
RCL 00
int
STO 05
;
RCL 01
int
STO 06
;
FIX 6
;
LBL 02
alpha "Xmin"
STOa 0
XEQ 10
STO 00
;
alpha "Xmax"
STOa 1
RCL 13
STO 01
;
alpha "Yref"
STOa 2
0e+00
STO 02
;
RCLa 9
inpt 3
;
RCL 02
STO 04
;
RCL 01
STO 03
;
RCL 00
STO 02
;
RCL 02
RCL 12
x > y
STO 02
;
RCL 13
RCL 03
x <= y
GTO 04
RCL 13
STO 03
GTO 04
;
LBL 05
RCL 02
STO 00
RCL 03
STO 01
alpha "Xmin: "
STOa 0
alpha "Xmax: "
STOa 1
alpha "Xmin must be smaller than Xmax!"
view 2
GTO 02
;
LBL 04
RCL 03
RCL 02
x >= y
GTO 05
;
XEQ 80
;
STO 00
alpha "Area Under Curve = "
STOa 0
RCLa 9
view 1
;
STOP
;
LBL 10
RCL 05
1000
/
STO 10
size
1
-
RCL 10
+
STO 11
;
RCL 10
int
RCL 06
1000
/
+
STO 40
;
RCL 11
int
RCL 06
1000
/
+
STO 41
;
LBL 90
RCLi 41
test 1
GTO 91
test 2
GTO 91
RCLi 11
test 1
GTO 91
test 2
GTO 91
STO 13
;
LBL 92
RCLi 40
test 1
GTO 93
test 2
GTO 93
RCLi 10
test 1
GTO 93
test 2
GTO 93
STO 12
;
RTN
;
LBL 91
RCL 41
1
-
STO 41
RCL 11
1
-
STO 11
GTO 90
;
LBL 93
RCL 40
1
+
STO 40
RCL 10
1
+
STO 10
GTO 92
;
LBL 95
RCL 10
1
+
STO 10
GTO 94
;
LBL 97
RCL 11
1
-
STO 11
GTO 96
;
LBL 70
RCL 20
1
-
STO 19
RCL 40
1
-
STO 39
RCLi 40
RCLi 39
-
RCL 02
RCLi 19
-
RCLi 20
RCLi 19
-
/
*
RCLi 39
+
RCLi 40
+
2
/
RCL 04
-
RCLi 20
RCL 02
-
*
ADD 00
RTN
;
LBL 71
RCL 20
1
+
STO 19
RCL 40
1
+
STO 39
RCLi 39
RCLi 40
-
RCL 03
RCLi 20
-
RCLi 19
RCLi 20
-
/
*
RCLi 40
+
RCLi 40
+
2
/
RCL 04
-
RCL 03
RCLi 20
-
*
ADD 00
RTN
;
LBL 80
;
LBL 94
RCLi 10
test 1
GTO 95
RCL 02
x > y
GTO 95
;
LBL 96
RCLi 11
test 1
GTO 97
RCL 03
x < y
GTO 97
;
RCL 11
RCL 10
-
1e-05
+
int
STO 01
;
0e+00
STO 00
;
RCL 10
STO 20
int
RCL 06
1000
/
+
STO 40
;
RCL 20
1
+
STO 22
;
RCL 40
1
+
STO 42
;
0e+00
RCL 01
x <= y
GTO 81
;
RCLi 20
RCL 02
x < y
XEQ 70
;
LBL 98
RCLi 22
RCLi 20
-
RCLi 42
test 1
GTO 60
test 2
GTO 60
RCLi 40
+
2
/
RCL 04
-
*
ADD 00
;
1
ADD 22
ADD 42
RCL 22
1
-
STO 20
RCL 42
1
-
STO 40
GTO 62
;
LBL 60
1
ADD 42
ADD 22
;
LBL 62
0e+00
DSE 01
GTO 98
;
RCLi 20
RCL 03
x > y
XEQ 71
;
RCL 00
RTN
;
LBL 81
RCLi 20
RCL 03
x <= y
GTO 82
RCL 20
RCL 02
x < y
XEQ 70
RCLi 20
RCL 03
x > y
XEQ 71
RTN
;
LBL 82
RCLi 22
RCLi 20
-
STO 19
RCLi 42
RCLi 40
-
STO 39
RCL 02
RCLi 20
-
RCL 19
/
RCL 39
*
RCLi 40
+
RCL 03
RCLi 20
-
RCL 19
/
RCL 39
*
RCLi 40
+
+
2
/
RCL 04
-
RCL 03
RCL 02
-
*
STO 00
RTN
;
alpha "Version 1.3 - 5/11/89"
alpha "by Lonnie R. Abelbeck"
alpha "Modified - 4.14.93"
alpha "by W. T. Jones"